SQL to delete duplicate records in a table [closed]
Posted
by oo
on Stack Overflow
See other posts from Stack Overflow
or by oo
Published on 2009-10-18T16:51:44Z
Indexed on
2010/04/06
19:43 UTC
Read the original article
Hit count: 117
Possible Duplicate:
Delete duplicate records from a SQL table without a primary key
I have a table with the columns
person_ID
firstname
lastname
and I somehow ended up with a bunch of duplicates.
Is there any way to look at all columns where firstname and lastname are the same and delete all except one of them (it doesn't matter which one is left as they are all the same.)
EDIT: I just found a duplicate question and perfect answer: http://stackoverflow.com/questions/985384/delete-duplicate-records-from-a-sql-table-without-a-primary-key
© Stack Overflow or respective owner